package com.lq.eureka;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Configuration
public class Sender {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public String send() {
        amqpTemplate.convertAndSend("this is  a msg");
        amqpTemplate.convertSendAndReceive("send and  reiceive");
        return "success";
    }
}
